Parcellation

One of the main components of a Connectome is the Parcellation, which comprises a list of regions over which fibre tracts are summarised.

By default we use the Desikan-Killiany-Tourville (DKT) atlas, provided as standard by FreeSurfer. The parcellation is included within the main connectome file that ships with Connectomes.jl. We can load it like so:

using Connectomes

connectome_path = Connectomes.connectome_path()
"/home/runner/work/Connectomes.jl/Connectomes.jl/assets/connectomes/Connectomes-hcp-scale1.xml"

The parcellation can be loaded from the connectome_path in the following way.

parc = Parcellation(connectome_path)
Parcellation with 83 regions

A parcellation is simply a collection of Regions.

struct Parcellation
    regions::Vector{Region}
end

Where Regions comprise pertinent information relating to a given region.

struct Region
    ID::Int                 # DKT region ID number
    Label::String           # Region name
    Region::String          # Cortical or Subcortical
    Lobe::String            # Lobe the region belongs to
    Hemisphere::String      # Hemisphere the region belongs to
    x::Float64              # x coordinate 
    y::Float64              # y coordinate
    z::Float64              # z coordinate
end

parc can be numerically indexed to retrieve regions, either as a Int

parc[1]
Region 1: right lateralorbitofrontal

or a Vector{Int}, which will return a new Parcellation.

parc[[1, 2, 3]]
Parcellation with 3 regions

If we load a Makie backend, we can conveniently plot the parcellation. Let's say, we just want to plot the left side of the connectome. We can do the following.

using WGLMakie

left_parc = filter(x -> get_hemisphere(x) == "left", parc)

plot_parc(left_parc; resolution=(500, 350), view=:left)